<!DOCTYPE html>
<html lang="zh-CN">
    <head>
        <meta charset="UTF-8">
        <title>403 Forbidden - FNK</title>
        <link rel="stylesheet" href="/static/css/navbar.css">
        <style>
          /* 403错误内容 */
        .error-content {
            display: flex;
            flex-direction: column;
            align-items: center;
            justify-content: center;
            min-height: calc(100vh - 70px);
            padding: 40px 20px;
            text-align: center;
        }
        
        .error-container {
            max-width: 700px;
            padding: 50px;
            background-color: white;
            border-radius: 10px;
            box-shadow: 0 4px 20px rgba(0, 0, 0, 0.08);
        }
        
        .error-code {
            font-size: 120px;
            font-weight: bold;
            color: #f39c12; /* 使用橙色强调禁止访问 */
            margin-bottom: 20px;
            line-height: 1;
        }
        
        .error-title {
            font-size: 36px;
            margin-bottom: 20px;
            color: #2c3e50;
        }
        
        .error-description {
            font-size: 18px;
            margin-bottom: 40px;
            color: #7f8c8d;
            line-height: 1.7;
        }
        
        .action-buttons {
            display: flex;
            gap: 20px;
            justify-content: center;
            flex-wrap: wrap;
        }
        
        .btn {
            display: inline-block;
            padding: 14px 28px;
            border-radius: 6px;
            text-decoration: none;
            font-weight: 500;
            font-size: 16px;
            transition: all 0.3s ease;
        }
        
        .btn-primary {
            background-color: #3498db;
            color: white;
            border: 2px solid #3498db;
        }
        
        .btn-primary:hover {
            background-color: #2980b9;
            border-color: #2980b9;
            transform: translateY(-2px);
        }
        
        .btn-secondary {
            background-color: white;
            color: #3498db;
            border: 2px solid #3498db;
        }
        
        .btn-secondary:hover {
            background-color: #f8f9fa;
            transform: translateY(-2px);
        }
        
        /* 动画效果 */
        @keyframes shake {
            0%, 100% { transform: translateX(0); }
            10%, 30%, 50%, 70%, 90% { transform: translateX(-5px); }
            20%, 40%, 60%, 80% { transform: translateX(5px); }
        }
        
        .error-illustration {
            width: 220px;
            margin-bottom: 40px;
            animation: shake 0.8s ease-in-out;
        }
        
        /* 响应式设计 */
        @media (max-width: 768px) {
            .navbar {
                padding: 0 15px;
                height: 60px;
            }
            
            .logo {
                font-size: 1.5em;
            }
            
            .nav-links li {
                margin-left: 15px;
            }
            
            .error-code {
                font-size: 80px;
            }
            
            .error-title {
                font-size: 28px;
            }
            
            .error-description {
                font-size: 16px;
            }
            
            .btn {
                padding: 12px 24px;
            }
            
            .error-container {
                padding: 30px 20px;
            }
        }
        
        @media (max-width: 480px) {
            .nav-links {
                display: none;
            }
            
            .error-code {
                font-size: 60px;
            }
            
            .action-buttons {
                flex-direction: column;
                gap: 12px;
            }
            
            .btn {
                width: 100%;
            }
        }
        </style>
    </head>
    <body>
        <nav class="navbar">
            <div class="logo">FNK</div>
            <ul class="nav-links">
                <li><a href="/home">首页</a></li>
                <li><a href="/file">文件</a></li>
                <li><a href="/note">笔记</a></li>
                <li><a href="/resource">资源</a></li>
                <li><a href="/about">关于</a></li>
            </ul>
            <div class="users">
                {% if user %}
                    <p>{{ user }}</p>
                    <button class="user-btn" onclick="javascript:location.href='/logout'">登出</button>
                {% else %}
                    <button class="user-btn" onclick="javascript:location.href='/login'">登录</button>
                {% endif %}
                </div>
        </nav>
        <!-- 403错误内容 -->
        <main class="error-content">
          <div class="error-container">
              <!-- 错误插图 -->
              <svg class="error-illustration" viewBox="0 0 200 200" xmlns="http://www.w3.org/2000/svg">
                  <circle cx="100" cy="100" r="90" fill="#fdebd0"/>
                  <path d="M70,70 Q100,40 130,70 Q160,100 130,130 Q100,160 70,130 Q40,100 70,70 Z" 
                        fill="none" stroke="#f39c12" stroke-width="10"/>
                  <path d="M80,90 L120,130 M80,130 L120,90" stroke="#f39c12" stroke-width="8" stroke-linecap="round"/>
                  <text x="100" y="190" text-anchor="middle" font-size="20" fill="#f39c12">403</text>
              </svg>
              
              <div class="error-code">403</div>
              <h1 class="error-title">拒绝访问</h1>
              <p class="error-description">
                  您没有权限访问此页面。<br>
                  如果您认为这是一个错误，请联系网站管理员或尝试使用其他账户登录。
              </p>
              
              <div class="action-buttons">
                  <a href="/home" class="btn btn-primary">返回首页</a>
                  <a href="/login" class="btn btn-secondary">登录账户</a>
              </div>
          </div>
      </main>
    </body>
</html>